<post_win_msg> : Post Window Message
Posts Windows message (the same as PostMessage Windows API call).
Syntax:
<post_win_msg>(Win, Msg, WParam, LParam)
Win
Title of the window to activate or HWND. HWND is a unique handle
Windows internally uses to identify each window. The HWND can be retrieved
by some commands (<wininfo>, <win_enumerate>) or is provided by some system
variables (_vKeybdFocusWindow_HWND, _vActiveWindow_HWND, _vActiveWindowPrev_HWND).
Msg
Windows message ID (decimal number).
WParam
WParam parameter of the Windows message (decimal number).
LParam
LParam parameter of the Windows message (decimal number).
Example:
<#> This macro controls WinAmp (if opened).
<#>
<cmds>
<varset>("vWin=WinAmp","")
<if_win>("vWin","OPEN",0)
<menu_additem>("Play")
<menu_additem>("Pause")
<menu_additem>("Stop")
<menu_additem>("Next")
<menu_additem>("Previous")
<menu_additem>("Next")
<menu_show>(-1,-1,vCommand,1,0)
<if_str>("vCommand == Play")
<post_win_msg>(vWin,273,40045,0)
<endif>
<if_str>("vCommand == Pause")
<post_win_msg>(vWin,273,40046,0)
<endif>
<if_str>("vCommand == Stop")
<post_win_msg>(vWin,273,40047,0)
<endif>
<if_str>("vCommand == Next")
<post_win_msg>(vWin,273,40048,0)
<endif>
<if_str>("vCommand == Previous")
<post_win_msg>(vWin,273,40044,0)
<endif>
<endif>